<!-- {if $member_from eq 'seller'}-->
		{include file=member.header.html}
        <!--{else}-->
       {include file=buyer.header.html}
        <!--{/if}-->
<script type="text/javascript">
//注册表单验证
$(function(){
 {if $step eq 1}
    $('#binding_form').validate({
        errorPlacement: function(error, element){
            $(element).next('.field_notice').hide();
            $(element).after(error);
        },
        success       : function(label){
            label.addClass('validate_right').text('OK!');
        },
        onkeyup: false,
        rules : {           
             mobile_verification_code : {
                required : true,
                isCode    : true, 
                remote   : {
                    url :'index.php?app=send_mobile&act=chack_verification_code',
                    type:'post',
                    data:{
                        mobile_verification_code : function(){
                            return $('#mobile_verification_code').val();
                        }
                    }
                }               
            }           
        },
        messages : {
             mobile_verification_code : {
                required : '验证码不能为空',
                isCode    : '验证码为6位的数字',
                remote    : '验证码不正确'
            }            
        }
    });   
  
  $("#send_mobile_code").click(function(){
        var phone_mob = $("#phone_mob").val();  
            
        if(phone_mob && userValidate.chacMobile(phone_mob))
        {
           userValidate.setMobileSession(phone_mob);
           userValidate.sendMobile(phone_mob,'pay_password_mobile');
           return;

        }
  });
{/if}

{if $step eq 2}
  $('#password_form').validate({
        errorPlacement: function(error, element){
            $(element).next('.field_notice').hide();
            $(element).after(error);
        },
        success       : function(label){
            label.addClass('validate_right').text('OK!');
        },
        onkeyup : false,
        rules : {
            new_password : {
                required   : true,
                minlength  : 6,
                maxlength  : 20,
                checkPassword : true
            },
            confirm_password : {
                required   : true,
                equalTo    : '#new_password',
                checkPassword : true
            }
        },
        messages : {
            new_password  : {
                required   : '密码不能为空',
                minlength  : '密码长度应在6-20个字符之间'
            },
            confirm_password : {
                required   : '密码不能为空',
                equalTo    : '两次输入的密码不相符'
            }
        }
    });
    
    $('#new_password').keyup(function(){
        userValidate.chkPWPower(this.value);        
    })
{/if}
  
});
</script>

<!-- 内容 -->
<div class="content f-cb">
  <!-- 当前位置 -->
  {include file=path.html}
  <!-- 内容左边栏 -->
  <!-- {if $member_from eq 'seller'}-->
		{include file=member.menu.html}
        <!--{else}-->
        {include file=member.menu.buyer.html}
        <!--{/if}-->
  <!-- 内容右边栏 -->
  <!-- 第一步 -->
  <!-- {if $step eq 1}--> 
  <div class="right_content">
  <div class="t_1">绑定手机方式设置支付密码</div>
  <div class="step_set bg_png step_set_current_1"><span class="step_set_1_1 current">1 获取短信验证码</span><span class="step_set_1_2">2 设置新密码</span><span class="step_set_1_3">3 完成</span></div>
  </div>
  
  <div class="con-receive-r b-radius safety_content">
    <div class="eject_con">
      <div class="add safety_modify_password">
        <form method="post"  action="index.php?app=send_mobile&act=check_mobile_code&mode=set_pay_password&from={$member_from}" id="binding_form">
          <ul>
            <li>
              <h3>手机号码: </h3>
              <p>{$accout_data.hide_mobile}<input type="hidden" name="phone_mob" id="phone_mob" value="{$accout_data.binding_mobile}" /></p>
            </li>
            <li>
              <h3>验证码: </h3>
              <p>
                <input type="text" class="text width2 b-radius" name="mobile_verification_code" maxlength="6" id="mobile_verification_code" disabled="disabled" />
                &nbsp;&nbsp;
                <input class="button_on b-radius" type="button" value="获取短信验证码" id="send_mobile_code" />
                </p>
            </li>           
          </ul>
          <p style="display:none;padding-left: 146px;" id="show_error" >验证码已经发送,敬请查看!</p> 
          <div class="submit submit_1">
            <input type="submit" class="subbtn b-radius" value="提交"  id="send_submit" disabled="disabled" />
            </div>          
        </form>
      </div>
    </div>
  </div>
  <!--{/if}-->
  <!-- 第二步 -->
  <!-- {if $step eq 2}--> 
  <div class="right_content">
  <div class="t_1">绑定手机方式设置支付密码</div>
  <div class="step_set bg_png step_set_current_2"><span class="step_set_1_1">1 获取短信验证码</span><span class="step_set_1_2 current">2 设置新密码</span><span class="step_set_1_3">3 完成</span></div>
  </div> 
  <div class="con-receive-r b-radius safety_content">
    <div class="eject_con">
      <div class="add safety_modify_password">
        <form method="post" id="password_form" action="index.php?app=pay_password&act=set_pay_password&set_type=mobile&from={$member_from}">
          <ul>
            <li>
              <h3>新支付密码: </h3>
              <p>
                <input type="password" class="text width_normal b-radius" name="new_password" id="new_password" oncontextmenu="return false" oncopy="return false" oncut="return false" maxlength="20" />
              </p>
              <p class="level" id="level"><span class="low" id="low">弱</span><span class="middle" id="middle">中</span><span class="strong" id="strong">强</span><input type="hidden" name="password_level" id="password_level" value="1" /></p>
            </li>
            <li>
              <h3>确认新支付密码: </h3>
              <p>
                <input type="password" class="text width_normal b-radius" name="confirm_password" oncontextmenu="return false" oncopy="return false" oncut="return false" maxlength="20" />
              </p>
            </li>
          </ul>
          <div class="submit">
            <input type="submit" class="subbtn b-radius" value="下一步">
            </div>
        </form>
      </div>
    </div>
  </div>
  <!--{/if}-->
  <!-- 完成 -->
  <!-- {if $step eq 3}--> 
  <div class="right_content">
    <div class="t_1">绑定手机方式设置支付密码</div>
    <div class="step_set bg_png step_set_current_3"><span class="step_set_1_1">1 获取短信验证码</span><span class="step_set_1_2">2 设置新密码</span><span class="step_set_1_3 current">3 完成</span></div>
  </div>
  <div class="con-receive-r b-radius safety_content">
    <div class="eject_con">
      <div class="add safety_modify_password">
        <div class="set_succeed">
          <h3>设置支付密码成功</h3>
          <p class="linkbtn"><a href="index.php?app=account_security&from={$member_from}">返回安全设置</a></p>
        </div>
      </div>
    </div>
  </div>
  <!--{/if}-->
</div>
<!-- 页脚 -->
{include file=footer.html}